<?php
if (!function_exists('getRegUsername')) 
{
	function getRegUsername()
	{
		$CI = &get_instance();
		$user = $CI->input->post('username');
		if($user != null)
		{
			return $user;
		}
		return null;
	}
}

if (!function_exists('getRegPassword')) 
{
	function getRegPassword()
	{
		$CI = &get_instance();
		$password = $CI->input->post('password');
		if($password != null)
		{
			return $password;
		}
		return null;
	}
}

if (!function_exists('getRegEmail')) 
{
	function getRegEmail()
	{
		$CI = &get_instance();
		$email = $CI->input->post('email');
		if($email != null)
		{
			return $email;
		}
		return null;
	}
}

// Functions to define urls and titles for the masterpage
if (!function_exists('getRegViewUrl'))
{
	function getRegViewUrl()
	{
		return "register/register";
	}
}

if (!function_exists('getRegViewTitle'))
{
	function getRegViewTitle()
	{
		return "Register user";
	}
}

if (!function_exists('getRegViewSuccessUrl'))
{
	function getRegViewSuccessUrl()
	{
		return "register/success";
	}
}

if (!function_exists('getRegViewSuccessTitle'))
{
	function getRegViewSuccessTitle()
	{
		return "New user created!";
	}
}

if (!function_exists('getRegCtrlBase'))
{
	function getRegCtrlBase()
	{
		return "register/index";
	}
}